//? 全局作用域
var name = 'Peter';
//? 函数作用域
function greet() {
    var greeting = 'Hello';
    //? 块级作用域
    {
        let lang = 'English';
        console.log(`${lang}: ${greeting} ${name}`);
    }
}
greet();

//? 词法作用域示例
var number = 42;
function printNumber() {
    console.log(number);
}
function log() {
    var number = 54;
    printNumber();
}
// Prints 42
log();


let a = 'Hello World!';
function first() {
    console.log('Inside first function');
    second();
    console.log('Again inside first function');
}
function second() {
    console.log('Inside second function');
}
first();
console.log('Inside Global Execution Context');
